#ifndef ECU_SPI_H_
#define ECU_SPI_H_

extern u32 G_W5500_Rx_Addr;    /*数据接收的首地址*/
extern u32 G_W5500_Tx_Addr;    /*数据发送的首地址*/

extern u8 pTmpBuf1[];//tx
extern u8 pTmpBuf2[];//rx

void ECU_SPI_INIT(void);
void ECU_SPI_DMA_START(void);
void SPI2_DMA_IRQ_TX(void);
void SPI2_DMA_IRQ_RX(void);

void ECU_W5500_SPI_INIT(void);
void SPI_DMA_WRITE(uint8_t* Addref, uint8_t* pTxBuf, uint16_t tx_len);
void SPI_DMA_READ(uint8_t* Addref, uint8_t* pRxBuf, uint16_t rx_len);

#endif
